 
import { createBrowserRouter} from "react-router-dom"
import MainLayout from "../layouts/MainLayout"
import Home from "../pages/Home"
import Login from "../pages/Login"
import Register from "../pages/Register"
import NotFound from "../pages/NotFound"
import ManageLayout from "../layouts/ManageLayout"
import List from "../pages/manage/List"
import Star from "../pages/manage/Star"
import Trash from "../pages/manage/Trash"
import QuesionLayout from "../layouts/QuesionLayout"
import Edit from "../pages/question/Edit"
import Stat from "../pages/question/Stat"

const router1 = createBrowserRouter([
    {
        path: '/',
        element: <MainLayout/>,
        children:[
            {path: '/', element:<Home />},
            {path: '/login', element:<Login />},
            {path: '/register', element:<Register />},
            {path: '*', element:<NotFound />},
            {
                path: 'manage',
                element: <ManageLayout/>,
                children:[
                    {path: 'list', element:<List />},
                    {path: 'star', element:<Star />},
                    {path: 'trash', element:<Trash />},
                    {path: '*', element:<NotFound />}
                ]
            }
        ]
    },
    {
        path: 'question',
        element: <QuesionLayout/>,
        children:[
            {path: 'edit/:id', element:<Edit />},
            {path: 'stat/:id', element:<Stat />},
            {path: '*', element:<NotFound />}
        ]
    }
])


export default router1